home *** CD-ROM | disk | FTP | other *** search
- /*
- * cpuchk_c.c 29-Sep-1992 13:35:31
- *
- * purpose: to demonstrate use of cpuchk()
- * use this test where cpu type will determine coding
- *
- * int cpuchk( void )
- * uses: EAX, EBX, ECX
- * saves: flags
- * returns 0, 1, 2, 3, 4 for 86/88, 186, 286, 386, 486
- * value is returned in AX
- *
- * link with cpuchk_a.obj
- *
- */
-
- extern int cpuchk( void );
-
- #include <stdio.h>
-
- main()
- {
- switch( cpuchk() )
- {
- case 0: printf("\nThis CPU is a 8086 or 8088.\n");
- break;
- case 1: printf("\nThis CPU is a 80186.\n");
- break;
- case 2: printf("\nThis CPU is a 80286.\n");
- break;
- case 3: printf("\nThis CPU is a 80386.\n");
- break;
- case 4: printf("\nThis CPU is a 80486.\n");
- break;
- default: printf("\n\a\aWhat are you running... a CoCo 2 ? ? ?\n");
- break;
- }
- return(0);
- }
-